<?php $this->load->view('common/head');?>
    <form class="form-inline" action="<?php echo $this->input->server('REQUEST_URI'); ?>" method="post" enctype="multipart/form-data">
    <input type="hidden" name="type" id="type" value="<?=$type?>">
      <table class="table">
        <thead>
          <tr>
            <th colspan="2"><?=$typeName?>导入</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td><label for="year" class="control-label">年份：</label></td>
            <td align="left">
                <select class="form-control" placeholder=".col-xs-4" id="year" name="year">
                </select>
            </td>
          </tr>
          <?php if (!in_array($type, array(51))): ?>
          <tr>
            <td><label for="timeUnit" class="control-label">请选择双月：</label></td>
            <td align="left">
              <select class="form-control" placeholder=".col-xs-4" id="timeUnit" name="timeUnit">
              </select>
            </td>
          </tr>
          <?php endif ?>
          <tr>
            <td><label for="inputFile" class="control-label">选择文件:</label></td>
            <td align="left"><input type="file" class="form-control" id="inputFile" name="inputFile"></td>
          </tr>
          <tr>
            <td><label for="tempTile" class="control-label">模板下载:</label></td>
            <td align="left"><a class="btn btn-default" href="<?=$templateFile?>" role="button">下载</a></td>
          </tr>
          <tr>
            <td colspan="2" class="text-center">
              <button type="submit" class="btn btn-default btn-primary">提交</button>        
            </td>
            <td></td>
          </tr>
        </tbody>
      </table>
    </form>
<script type="text/javascript">
$(function(){
    loadYearList('year',<?=$year ? $year : 0?>);
    loadTimeUnitList('timeUnit',<?=$year ? $year : 0?>,<?=$timeUnit ? $timeUnit : 0?>);
});
$("#year").change(function(){
    loadTimeUnitList('timeUnit',this.value);
  });
</script>
<?php $this->load->view('common/foot');?>